﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Clueless
{
    public partial class gameOver : Form
    {
        public delegate void GameOverDelegate(String eventMessage, String character, String room, String weapon, String player);

        public gameOver()
        {
            InitializeComponent();
        }

        public void SetMessages(String eventMessage, String character, String room, String weapon, String player)
        {
            if (suspectTextBox.InvokeRequired)
                suspectTextBox.Invoke(new GameOverDelegate(SetMessages), eventMessage, character, room, weapon, player);
            else
            {
                this.Text = player + " Accused!";

                playerResult.Text = eventMessage;

                suspectTextBox.Text = character;
                weaponTextBox.Text = weapon;
                currentRoomTextBox.Text = room;

            }
        }

        private void gameOverCloseButton_Click(object sender, EventArgs e)
        {
            this.Hide();
        }
    }
}
